[Merged by Bors] - Add block roots heal logic in v18 schema migration.#4875
[Merged by Bors] - Add block roots heal logic in v18 schema migration.#4875jimmygchen wants to merge 1 commit intosigp:unstablefrom
Conversation
michaelsproul
left a comment
There was a problem hiding this comment.
I can't fault this, and I think the tests are great.
Let's merge!
| last_restore_point_slot.as_usize(), | ||
| )?; | ||
|
|
||
| for slot in (last_restore_point_slot.as_u64()..split.slot.as_u64()).map(Slot::new) { |
There was a problem hiding this comment.
Noting that this is the correct upper-bound, because the invariant is exclusive of the split slot. We see that here:
lighthouse/beacon_node/store/src/hot_cold_store.rs
Lines 1764 to 1768 in 441fc16
This also matches the invariant description on the PR.
I've opened #4878 to track the broader DB invariant project.
There was a problem hiding this comment.
Thanks for checking!
Great team work on the tests 😄
|
bors r+ |
## Issue Addressed Fixes #4697. This also unblocks the state pruning PR (#4835). Because self healing breaks if state pruning is applied to a database with missing block roots. ## Proposed Changes - Fill in the missing block roots between last restore point slot and split slot when upgrading to latest database version.
|
Pull request successfully merged into unstable. Build succeeded! The publicly hosted instance of bors-ng is deprecated and will go away soon. If you want to self-host your own instance, instructions are here. If you want to switch to GitHub's built-in merge queue, visit their help page.
|
## Issue Addressed Closes #4481. (Continuation of #4648) ## Proposed Changes - [x] Add `lighthouse db prune-states` - [x] Make it work - [x] Ensure block roots are handled correctly (to be addressed in 4735) - [x] Check perf on mainnet/Goerli/Gnosis (takes a few seconds max) - [x] Run block root healing logic (#4875 ) at the beginning - [x] Add some tests - [x] Update docs - [x] Add `--freezer` flag and other improvements to `lighthouse db inspect` Co-authored-by: Michael Sproul <[email protected]> Co-authored-by: Jimmy Chen <[email protected]> Co-authored-by: Michael Sproul <[email protected]>
Issue Addressed
Fixes #4697.
This also unblocks the state pruning PR (#4835). Because self healing breaks if state pruning is applied to a database with missing block roots.
Proposed Changes